package com.travel.service.impl;

import com.travel.TestApi;
import com.travel.cms.Content;
import com.travel.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作者:lenovo
 * 时间:2021/4/14  21:30
 **/
@Service
public class IndexServiceImpl implements IndexService {

    //注入service
    @Autowired
    private TestApi testApi;

    @Override
    public List<Content> listContentByCid(String cid) {

        //远程调用   1.接口声明 2.才会被调用
        //接口声明在api中
        return testApi.findContentByCid(cid);
    }
}
